class NS_NO_VTABLE nsITransfer : public nsIWebProgressListener2 {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITRANSFER_IID)
/**
* Initializes the transfer with certain properties. This function must
* be called prior to accessing any properties on this interface.
*
* @param aSource The source URI of the transfer. Must not be null.
*
* @param aTarget The target URI of the transfer. Must not be null.
*
* @param aDisplayName The user-readable description of the transfer.
* Can be empty.
*
* @param aMIMEInfo The MIME info associated with the target,
* including MIME type and helper app when appropriate.
* This parameter is optional.
*
* @param startTime Time when the download started (ie, when the first
* response from the server was received)
* XXX presumably wbp and exthandler do this differently
*
* @param aTempFile The location of a temporary file; i.e. a file in which
* the received data will be stored, but which is not
* equal to the target file. (will be moved to the real
* target by the caller, when the download is finished)
* May be null.
*
* @param aCancelable An object that can be used to abort the download.
* Must not be null.
* Implementations are expected to hold a strong
* reference to this object until the download is
* finished, at which point they should release the
* reference.
*/
/* void init (in nsIURI aSource, in nsIURI aTarget, in AString aDisplayName, in nsIMIMEInfo aMIMEInfo, in PRTime startTime, in nsILocalFile aTempFile, in nsICancelable aCancelable); */
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsTransfer : public nsITransfer
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSITRANSFER
nsTransfer();
private:
~nsTransfer();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsTransfer, nsITransfer)
nsTransfer::nsTransfer()
{
/* member initializers and constructor code */
}
nsTransfer::~nsTransfer()
{
/* destructor code */
}
/* void init (in nsIURI aSource, in nsIURI aTarget, in AString aDisplayName, in nsIMIMEInfo aMIMEInfo, in PRTime startTime, in nsILocalFile aTempFile, in nsICancelable aCancelable); */